package controller;

import java.awt.Point;
import java.util.Map;

import utils.PlayerSides;

import model.Board;
import model.pieces.Piece;

/**
 * Class represents a Player in game
 */
public abstract class Player {
	
	protected PlayerSides.Sides side; // player's side
	protected Map<Point, Piece> pieces; // player's pieces
	protected Board board; // game board
	
	/**
	 * Constructor- creates a new player in chess game
	 * @param side- player's side
	 * @param pieces- player's pieces
	 * @param board- game board
	 */
	public Player(PlayerSides.Sides side, Map<Point, Piece> pieces, Board board) {
		
		// set members according to given values
		this.side = side;
		this.pieces = pieces;		
		this.board = board;
	}
	
	/**
	 * Returns player's side
	 * @return player's side
	 */
	public PlayerSides.Sides getPlayerSide() { return side; }
	
	/**
	 * Chooses player's movement at current turn
	 * @return plyaer's movement at current turn
	 */
	public abstract Movement chooseMove();	
	
	/**
	 * Returns player's choice for piece to replace Pawn 
	 * @param options- options for piece to replace Pawn
	 * @param defaultOption- default option for replacing piece
	 * @return player's choice to replace Pawn
	 */
	public abstract int getReplacingPawnOption(String[] options, int defaultOption);
}